home *** CD-ROM | disk | FTP | other *** search
/ Pascal Super Library / Pascal Super Library (CW International)(1997).bin / DELPHI32 / COMPNENT / DTOOLS3 / DTOOLS3.ZIP / DEMOMAIN.PAS < prev    next >
Pascal/Delphi Source File  |  1996-04-04  |  3KB  |  116 lines

  1. unit Demomain;
  2.  
  3. interface
  4.  
  5. uses
  6.   SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics, Controls,
  7.   Forms, Dialogs, Buttons, StdCtrls, Custbtn, Balloon, Dtmisc,
  8.   VisApp;
  9.  
  10. type
  11.   TFrontPanel = class(TForm)
  12.     BWCCBtn: TShadowButton;
  13.     ODBtn: TShadowButton;
  14.     MiscBtn: TShadowButton;
  15.     ClockBtn: TShadowButton;
  16.     LEDBtn: TShadowButton;
  17.     CustomHint: TCustomHint;
  18.     BalloonHint: TBalloonHint;
  19.     VisualApp1: TVisualApp;
  20.     BackgroundBtn: TShadowButton;
  21.     procedure MiscBtnClick(Sender: TObject);
  22.     procedure BWCCBtnClick(Sender: TObject);
  23.     procedure LEDBtnClick(Sender: TObject);
  24.     procedure ClockBtnClick(Sender: TObject);
  25.     procedure ODBtnClick(Sender: TObject);
  26.     procedure FormCreate(Sender: TObject);
  27.     procedure VisualApp1Message(var Msg: TMsg; var Handled: Boolean);
  28.     procedure BackgroundBtnClick(Sender: TObject);
  29.   private
  30.     { Private declarations }
  31.   public
  32.     { Public declarations }
  33.     procedure LoadGrossBitmaps;
  34.     procedure UnloadGrossBitmaps;
  35.   end;
  36.  
  37. var
  38.   FrontPanel: TFrontPanel;
  39.  
  40. implementation
  41.  
  42. {$R *.DFM}
  43. {$IFNDEF WIN32}
  44. {$R DTDEMO.RES}
  45. {$ELSE}
  46. {$R DTDEMO32.RES}
  47. {$ENDIF}
  48.  
  49. uses
  50.   DemoBWCC, DemoLED, DemoClok, DemoMisc, DemoDraw, DemoBack;
  51.  
  52. procedure TFrontPanel.UnloadGrossBitmaps;
  53. begin
  54.   BWCCBtn.Bitmap.Handle := 0;
  55.   ODBtn.Bitmap.Handle := 0;
  56.   MiscBtn.Bitmap.Handle := 0;
  57.   ClockBtn.Bitmap.Handle := 0;
  58.   LEDBtn.Bitmap.Handle := 0;
  59.   BackgroundBtn.Bitmap.Handle := 0;
  60. end;
  61.  
  62. procedure TFrontPanel.LoadGrossBitmaps;
  63. begin
  64.   BWCCBtn.Bitmap.Handle := LoadBitmap(HInstance, 'BWCC');
  65.   ODBtn.Bitmap.Handle := LoadBitmap(HInstance, 'OWNERDRAW');
  66.   MiscBtn.Bitmap.Handle := LoadBitmap(HInstance, 'MISC');
  67.   ClockBtn.Bitmap.Handle := LoadBitmap(HInstance, 'CLOCK');
  68.   LEDBtn.Bitmap.Handle := LoadBitmap(HInstance, 'LED');
  69.   BackgroundBtn.Bitmap.Handle := LoadBitmap(HInstance, 'BACKGROUND');
  70. end;
  71.  
  72. procedure TFrontPanel.MiscBtnClick(Sender: TObject);
  73. begin
  74.   MiscGadgets.ShowModal;
  75. end;
  76.  
  77. procedure TFrontPanel.BWCCBtnClick(Sender: TObject);
  78. begin
  79.   BWCCControls.ShowModal;
  80. end;
  81.  
  82. procedure TFrontPanel.LEDBtnClick(Sender: TObject);
  83. begin
  84.   LEDControls.ShowModal;
  85. end;
  86.  
  87. procedure TFrontPanel.ClockBtnClick(Sender: TObject);
  88. begin
  89.   Clocks.ShowModal;
  90. end;
  91.  
  92. procedure TFrontPanel.ODBtnClick(Sender: TObject);
  93. begin
  94.   OwnerDrawControls.ShowModal;
  95. end;
  96.  
  97. procedure TFrontPanel.FormCreate(Sender: TObject);
  98. begin
  99.   BalloonHint.Active := True;
  100. end;
  101.  
  102. procedure TFrontPanel.VisualApp1Message(var Msg: TMsg;
  103.   var Handled: Boolean);
  104. begin
  105.   with Msg do
  106.     if (message = WM_KEYDOWN) and (wParam = VK_F1) then
  107.       Application.HelpContext(0);
  108. end;
  109.  
  110. procedure TFrontPanel.BackgroundBtnClick(Sender: TObject);
  111. begin
  112.   BackgroundControls.ShowModal;
  113. end;
  114.  
  115. end.
  116.